oxenstored: Enforce a maximum message size of 4096 bytes
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 7 Feb 2013 14:21:47 +0000 (14:21 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 7 Feb 2013 14:21:47 +0000 (14:21 +0000)
commited759d20249197cf87b338ff0ed328052ca3b8e7
treebf6cc8260b70ba381c18ceca89fb4749421c8529
parent331a3b6ff03932c6d577073880c08adb1ff3cbee
oxenstored: Enforce a maximum message size of 4096 bytes

The maximum size of a message is part of the protocol spec in
  xen/include/public/io/xs_wire.h

Before this patch a client which sends an overly large message can
cause a buffer read overrun.

Note if a badly-behaved client sends a very large message
then it will be difficult for them to make their connection
work again-- they will probably need to reboot.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/ocaml/libs/xb/partial.ml